import {LOGIN} from '../../constant/type'
var LoginInitState = null
JSON.parse(localStorage.getItem('isLogin'))? LoginInitState=JSON.parse(localStorage.getItem('isLogin')):LoginInitState={isLogin:false,uid:''}
export const login = (preState=LoginInitState,action) => {
    const {type,data}=action
    switch(type){
        case LOGIN:
            return data
        default:
            return preState
    }
}